import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 言初
 * Date: 2024-04-01
 * Time: 22:55
 */
@WebServlet("/status")
public class StatusServlet extends HelloServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        resp.setStatus(404);
//        resp.setContentType("text/html;charSet=utf8");
//        resp.getWriter().write("返回404的响应");
        resp.setStatus(200);
        resp.setContentType("test/html;charSet=utf8");
        resp.getWriter().write("生日快乐哥~");
    }
}
